package product.controller;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import product.model.ProductInfo;
import product.service.ProductService;


/**
 * Created with Intellij IDEA.
 * Description;
 * User:TQ02
 * Data:2024-07-18
 * Time:13:00
 * Text：
 */
@RequestMapping("/product")
@RestController
public class ProductController {
    @Autowired
    private ProductService orderService;

    @RequestMapping ("/{ProductId}")
    public ProductInfo getOrderById(@PathVariable("ProductId")Integer ProductId){
        return orderService.selectProductById(ProductId);
    }


}
